Skip to content

Conversation

@JerryWu1234
Copy link
Contributor

@JerryWu1234 JerryWu1234 commented Apr 1, 2025

What is it?

fixes #7442

feat(qrl): add e2e test and retry logic for QRL resolution

Add a new e2e test to verify QRL behavior without uncaught promises. Introduce retry logic for QRL resolution to handle potential promise retries, ensuring robustness in asynchronous operations.

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

Introduce a new QRL component to handle inner computed QRL logic and add an e2e test to verify its behavior. The test ensures that the counter updates correctly without uncaught promises. Additionally, update the QRL class to use `retryOnPromise` for better error handling during QRL resolution.
@changeset-bot
Copy link

changeset-bot bot commented Apr 1, 2025

🦋 Changeset detected

Latest commit: 9d50c28

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JerryWu1234 JerryWu1234 changed the base branch from main to build/v2 April 1, 2025 03:08
JerryWu1234 and others added 2 commits April 1, 2025 11:08
…be block

The describe block was removed to streamline the test file and improve readability. The test logic remains unchanged, focusing on verifying the counter update functionality without uncaught promises.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 1, 2025

Open in StackBlitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@7470
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@7470
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@7470
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@7470

commit: 9d50c28

refactor(qrl): simplify promise handling in QRL class by removing redundant retryOnPromise
@wmertens
Copy link
Member

wmertens commented Apr 3, 2025

weird, looks like it makes e2e hang :( does pnpm test.e2e.chromium work for you @JerryWu1234 ?

@JerryWu1234
Copy link
Contributor Author

Yes. It's fine on my side. Let me try it on my own computer. But do it late

@JerryWu1234 JerryWu1234 marked this pull request as ready for review April 4, 2025 07:59
@JerryWu1234 JerryWu1234 requested a review from a team as a code owner April 4, 2025 07:59
@JerryWu1234 JerryWu1234 marked this pull request as draft April 4, 2025 08:25
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 9d50c28

@JerryWu1234 JerryWu1234 marked this pull request as ready for review April 4, 2025 08:49
wuls and others added 6 commits April 6, 2025 08:16
Introduce a new QRL component to handle inner computed QRL logic and add an e2e test to verify its behavior. The test ensures that the counter updates correctly without uncaught promises. Additionally, update the QRL class to use `retryOnPromise` for better error handling during QRL resolution.
…be block

The describe block was removed to streamline the test file and improve readability. The test logic remains unchanged, focusing on verifying the counter update functionality without uncaught promises.
refactor(qrl): simplify promise handling in QRL class by removing redundant retryOnPromise
@JerryWu1234 JerryWu1234 self-assigned this Apr 6, 2025
@JerryWu1234
Copy link
Contributor Author

@Varixo Now it's fine

@Varixo Varixo changed the title 7442 fix promise fail fix: retry computed qrl execution when not ready Apr 7, 2025
@Varixo Varixo moved this from Backlog to Waiting For Review in Qwik Development Apr 7, 2025
@JerryWu1234 JerryWu1234 requested a review from wmertens April 8, 2025 03:26
'@qwik.dev/core': patch
---

FIX: Introduce retry logic for QRL resolution to handle potential promise retries, ensuring robustness in asynchronous operations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖😅👌

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's problem here ?

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great @JerryWu1234 ! LGTM 🚀

@wmertens wmertens merged commit 11dce5d into QwikDev:build/v2 Apr 8, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from Waiting For Review to Done in Qwik Development Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[🐞] [v2] thrown Promise isn't caught when not awaiting

3 participants